package com.adbj.statictest;

public class A {
    private  static A aa ;
    //private volatile static A aa ;
    private A(){

    }

    public static A getAA(){
        if (aa==null){
            synchronized (A.class){
                if (aa==null){
                    aa=new A();
                    System.out.println(Thread.currentThread().getName()+"   aaaaaaaa");
                }
            }
        }
        return aa;
    }

    public void getMessage(){
        System.out.println("aaaaaa");
    }


}
